package cn.shengongying.exception;

import cn.shengongying.enums.ResponseCodeEnum;

/**
 * author: RXK
 * date: 2022/1/6 星期四
 * desc: 加解密异常 必须手动捕获处理
 */
public class DigestException extends Exception{

    private static final long serialVersionUID = 908096134932164530L;

    private ResponseCodeEnum responseCodeEnum;


    public DigestException(String message) {
        super(message);
    }

    public DigestException(ResponseCodeEnum responseCodeEnum) {
        super(responseCodeEnum.getMsg());
        this.responseCodeEnum = responseCodeEnum;
    }

    public ResponseCodeEnum getResponseCodeEnum() {
        return responseCodeEnum;
    }

    public void setResponseCodeEnum(ResponseCodeEnum responseCodeEnum) {
        this.responseCodeEnum = responseCodeEnum;
    }
}
